<html ng-app="diandanbao" class="ng-scope">
<head>
    <style type="text/css">@charset "UTF-8";
    [ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak, .ng-hide:not(.ng-hide-animate) {
        display: none !important;
    }
    ng\:form {
        display: block;
    }</style>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta content="telephone=no" name="format-detection">
    <link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon">
    <title>寄存管理</title>
    <link data-turbolinks-track="true" href="{RES}/mobile/{php echo $this->cur_tpl}/assets/diandanbao/weixin.css?v=1" media="all"
          rel="stylesheet">
    <style type="text/css">@media screen {
        .smnoscreen {
            display: none
        }
    }

    @media print {
        .smnoprint {
            display: none
        }
    }</style>
</head>
<body>
<div ng-view="" style="height: 100%;" class="ng-scope">
    <div class="ddb-nav-header ng-scope" common-header="">
        <div class="nav-left-item" onclick="jump();"><i class="fa fa-angle-left"></i></div>
        <div class="header-title ng-binding">寄存管理</div>
    </div>

    <div class="main-view order-show ng-scope" id="delivery-order-show">
        <div class="section">
            <a class="list-item arrow-right ng-binding" href="{php echo $this->createMobileUrl('detail', array('id' => $store['id']), true)}">
                <i class="fa fa-bookmark-o"></i> {$store['title']}
            </a>
            <a class="list-item arrow-right ng-binding" href="tel:{$store['tel']}">
                <i class="fa fa-phone"></i> 商家客服：{$store['tel']}
            </a>
        </div>
        <div class="space-8"></div>

        <div class="order-state-section ng-scope">
            <div class="order-state ng-isolate-scope active">
                <div class="order-state-header">
                    <div class="square">
                        <div class="line-through ng-hide" ng-hide="hide_left"></div>
                    </div>
                    <i class="fa fa-check-circle"></i>

                    <div class="square">
                        <div class="line-through" ng-hide="hide_right"></div>
                    </div>
                </div>
                <div class="order-state-body ng-binding">等待存入</div>
            </div>
            <div class="order-state ng-isolate-scope {if $order['status']==1 || $order['status']==-1}active{/if}">
                <div class="order-state-header">
                    <div class="square">
                        <div class="line-through" ng-hide="hide_left"></div>
                    </div>
                    <i class="fa fa-check-circle"></i>

                    <div class="square">
                        <div class="line-through" ng-hide="hide_right"></div>
                    </div>
                </div>
                <div class="order-state-body ng-binding">已存入</div>
            </div>
            <div class="order-state ng-isolate-scope {if $order['status']==-1}active{/if}">
                <div class="order-state-header">
                    <div class="square">
                        <div class="line-through" ng-hide="hide_left"></div>
                    </div>
                    <i class="fa fa-check-circle"></i>

                    <div class="square">
                        <div class="line-through ng-hide" ng-hide="hide_right"></div>
                    </div>
                </div>
                <div class="order-state-body ng-binding">已取出</div>
            </div>
        </div>
        <div class="space-8"></div>
        <div class="section no-bottom-border">
            <div class="list-item time">
                <span class="ng-binding">申请时间：{php echo date('Y-m-d H:i:s',$order['dateline'])}</span><br>
                {if !empty($order['savetime'])}
                <span class="ng-binding">存入时间：{php echo date('Y-m-d H:i:s',$order['savetime'])}</span><br>
                {/if}
                {if !empty($order['takeouttime'])}
                <span class="ng-binding">取出时间：{php echo date('Y-m-d H:i:s',$order['takeouttime'])}</span>
                {/if}
            </div>
            <div class="list-item ng-scope">
                <div class="name ng-binding">
                    卡号：{$order['savenumber']}
                </div>
            </div>
            <div class="list-item ng-scope">
                <div class="name ng-binding">
                    物品：{$order['title']}
                </div>
            </div>
            <div class="list-item ng-scope">
                <div class="name ng-binding">
                    姓名: {$order['username']}
                </div>
            </div>
            <div class="list-item ng-scope">
                <div class="name ng-binding">
                    电话: {$order['tel']}
                </div>
            </div>
            {if !empty($order['remark'])}
            <div class="list-item">
                <div class="name ng-binding">
                    备注: {$order['remark']}
                </div>
            </div>
            {/if}
            <div class="juchi"></div>
        </div>
    </div>
</div>
<script src="{RES}/mobile/{php echo $this->cur_tpl}/assets/diandanbao/jquery-1.11.3.min.js"></script>
<script>
    function confirmorder() {
            var url = "{php echo $this->createMobileUrl('pay', array('orderid' => $order['id']), true)}";
            window.location.href = url;

    }

    function jump() {
        var url = "{php echo $this->createMobileUrl('savewinelist', array(), true)}";
        window.location.href = url;
    }

    function cancelorder() {
        var url = "{php echo $this->createMobileUrl('cancelorder', array('id' => $order['id']), true)}";
        if (confirm("确认取消吗?")) {
            $.ajax({
                url: url, type: "post", dataType: "json", timeout: "10000",
                data: {
                },
                success: function (data) {
                    if (data.status == 1) {
                        location.href='{php echo $this->createMobileUrl('order', array(), true)}';
                    } else {
                        alert(data.msg);
                    }
                },error: function () {
                    alert("网络不稳定，请重新尝试!");
                }
            });
        }
    }
</script>
</body>
</html>